package com.caseProject.puremvc.mediator.states.graphicStates
{
	import com.caseProject.puremvc.mediator.gui.Graphic;
	import com.caseProject.puremvc.mediator.gui.NoteElement;
	import com.caseProject.puremvc.mediator.gui.StateElement;
	
	import flash.filters.DropShadowFilter;

	public class TransformState implements IGraphicState
	{
		public function TransformState()
		{
		}
		
		public function setVisual(g:Graphic):void
		{
			g.filters = [new DropShadowFilter (0, 45, 0x00FF00, 1, 10, 10, 5)];
		}
		
		public function action(g:Graphic):void
		{
			g.enableDrag = false;
			if (g is NoteElement)
			{
				NoteElement(g).enableTransform = true;
			}
			else if (g is StateElement)
			{
				StateElement(g).enableTransform = true;
			}			
		}
	}
}